package com.oceansoft.mobile.biz.front.entity;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

public class AnswerUser {
	private Integer id;
	private Integer questId;
	private String openId;
	private String answer;
	private Integer score;
	
	public static RowMapper<AnswerUser> getMapp() {
		return new RowMapper<AnswerUser>() {
			@Override
			public AnswerUser mapRow(ResultSet rs, int rowNum) throws SQLException {
				AnswerUser answer = new AnswerUser();
				answer.setId(rs.getInt("id"));
				answer.setQuestId(rs.getInt("question"));
				answer.setOpenId(rs.getString("open_id"));
				answer.setAnswer(rs.getString("answer"));
				answer.setScore(rs.getInt("score"));
				return answer;
			}
		};
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getQuestId() {
		return questId;
	}

	public void setQuestId(Integer questId) {
		this.questId = questId;
	}

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	public Integer getScore() {
		return score;
	}

	public void setScore(Integer score) {
		this.score = score;
	}
	
}
